From dbde686ca6999aff05f1864642a705535d6f35d7 Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 31 Oct 2008 12:42:16 +0000 Subject: [PATCH] Explictly terminate buffer in skyforce to avoid uninitialized buffer walk. --- skyforce.c | 1 + 1 file changed, 1 insertion(+) diff --git a/skyforce.c b/skyforce.c index 910f2636b..6d6cf3746 100644 --- a/skyforce.c +++ b/skyforce.c @@ -93,6 +93,7 @@ skyforce_parse_trk(const char *str) memset(&tm, 0, sizeof(tm)); strncpy(buf, str + 2, sizeof(buf) - 1); + buf[14] = 0; cx = strptime(buf, "%d%m%y %H%M%S ", &tm); if ((cx != NULL) && (*cx != '\0')) -- 2.30.2